<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>用一个div模拟textarea的实现</title>
	<style>
		#textarea{
		    width:300px;
		    border:1px solid #ccc;
		    min-height:150px;
		    max-height:300px;
		    overflow:auto;
		    font-size:14px;
		    outline:none;
		}


	</style>
</head>
<body>
	
	<div id="textarea" contenteditable="true">

</body>


</html>